#!/bin/sh

# 设置目标和版本，提供默认值
TARGET="AntFaceSDK"
VERSION=${1:-"1.0.0"}

# 检查目录是否存在
if [ ! -d "${TARGET}/" ]; then
  echo "Error: Directory '${TARGET}/' does not exist."
  exit 1
fi

# 创建压缩包，排除不必要的文件
COPYFILE_DISABLE=1 tar --exclude="__MACOSX/*" --exclude="*.DS_Store" --exclude=".git*" -czf "${TARGET}_${VERSION}.tar.gz" ${TARGET}/

# 输出结果
echo "Created tarball: ${TARGET}_${VERSION}.tar.gz"
